﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JobsBoardDAL.DTOs
{
    public class CompanyDTO
    {
        public int ID { get; set; }
        public string CompanyName { get; set; }
        public byte[] Logo { get; set; }
        public string Description { get; set; }
        public string WebSite { get; set; }
        public string Email { get; set; }
        public string Phone { get; set; }

        public CompanyDTO()
        {
        }

        public Company ToCompany() 
        {
            return new Company()
            {
                CompanyName = this.CompanyName,
                CompanyLogo = this.Logo,
                Description = this.Description,
                WebSite = this.WebSite,
                Email = this.Email,
                Phone = this.Phone
            };
        }

        public void FillFromCompany(Company company)
        {
            this.ID = company.CompanyID;
            this.CompanyName = company.CompanyName;
            this.Logo = company.CompanyLogo;
            this.Description = company.Description;
            this.WebSite = company.WebSite;
            this.Email = company.Email;
            this.Phone = company.Phone;
        }
    }
}
